<?php
/**
 * Created by IntelliJ IDEA.
 * User: Administrator
 * Date: 15-10-26
 * Time: 下午9:59
 * To change this template use File | Settings | File Templates.
 */
/**
*车商确认功能单元测试
*@author Eric Lee
*/
namespace AuctionCore\AuctionOrder;
use AuctionCore\System\AuctionException;

class DealerConfirmTest extends \PHPUnit_Framework_TestCase {
      private $order_id = '1';
      private $dealer_id = '20';

      public function testConTrace(){

             $a = new DealerConfirm($this->order_id,$this->dealer_id);
             $reason = '现在忙，不方便，稍后再联系。';
             $time = date('Y-m-d H:i:s');
             try{
                 $res = $a->con_trace($reason,$time);
             }catch (\Exception $e){
                 echo $e->getMessage();
                 $res = false;
             }
             self::assertTrue($res?true:false);
      }
      public function testBreakAuction(){
              $a = new DealerConfirm($this->order_id,$this->dealer_id);
              $remark = '就是不想买了';
              try{
                  $res = $a->break_auction($remark);
              }catch (\Exception $e){
                  echo $e->getMesage();
                  $res = false;
              }
              self::assertTrue($res?true:false);
      }
      public function testAgree(){
              $a = new DealerConfirm($this->order_id,$this->dealer_id);
              try{
                  $res = $a->agree();
              }catch (\Exception $e){
                  echo $e->getMessage();
                  $res = false;
              }
              self::assertTrue($res?true:false);
      }
}

?>